﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Profiles;
using Styx.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.Plugins;

namespace rndbuddy
{
    public class Toon
    {
        public string Realm;
        public string Name;
        public string Class;
        public string FactionID;
        public string Level;

        public string MapName;
        public string MapID;
        public string SubZone;
        public string ZoneText;
        public string ZoneID;

        public string BagsFree;
        public string Money;

        public string x;
        public string y;
        public string z;

        public void poll()
        {
			Realm = StyxWoW.Me.RealmName;
            Name = Crypto.GetHashString(
                                        Crypto.GetHashString(StyxWoW.Me.Name) 
                                        + 
                                        Crypto.GetHashString(StyxWoW.Me.RealmName)
                                    );

            Class = StyxWoW.Me.Class.ToString();
            MapID = StyxWoW.Me.MapId.ToString();
            MapName = StyxWoW.Me.MapName;
            SubZone = StyxWoW.Me.SubZoneText;
            ZoneID = StyxWoW.Me.ZoneId.ToString();
            ZoneText = StyxWoW.Me.ZoneText;

            FactionID = "3"; //3 = undefined
            if (StyxWoW.Me.IsAlliance)
                FactionID = "1";
            if (StyxWoW.Me.IsHorde)
                FactionID = "2";

            Level = StyxWoW.Me.Level.ToString();
            BagsFree = Convert.ToUInt32(Styx.StyxWoW.Me.FreeBagSlots).ToString();
            Money = StyxWoW.Me.Gold.ToString();

            x = StyxWoW.Me.X.ToString();
            y = StyxWoW.Me.Y.ToString();
            z = StyxWoW.Me.Z.ToString();
        }
        

    }
}
